package com.lj.infoisland.domain.po;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

/**
 * 用户收藏表
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "user_favorites")
public class UserFavorites implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    /*
     * id
     */
    private Integer id;

    /**
     * 用户id
     */
    @TableField(value = "user_unique_id")
    private String userUniqueId;

    /**
     * 新闻id
     */
    @TableField(value = "news_id")
    private String newsId;

    /**
     * 收藏时间
     */
    @TableField(value = "created_at", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    private Date createdAt;

}